﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.Xml.Linq;
using Hammock;
using wp7cinema.Common;

namespace wp7cinema.View.Twitter
{
    public partial class TwitterMain : PhoneApplicationPage
    {
        public TwitterMain()
        {
            InitializeComponent();

            TweetTextBox.TextChanged += new TextChangedEventHandler(TweetTextBox_TextChanged);
        }

        void TweetTextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            int count = TweetTextBox.Text.Length;
            CharacterCount.Text = (140 - count).ToString();

            TweetBtn.IsEnabled = count > 0;
        }
    }
}